﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using DAL;
using IFactory;

namespace BLL
{
    public class FishBoneDiagram
    { 
        DataStructure dllDataStructure = new DataStructure();


        /// <summary>
        /// 添加方法
        /// </summary>
        /// <param name="_value"></param>
        /// <returns></returns>
        public int Add(object[] _value)
        {
            string sp_Name = "Insert_FishBoneDiagram";
            return dllDataStructure.getAffectRows(sp_Name, _value);
        }

        /// <summary>
        /// 根据部门和年份查询
        /// </summary>
        /// <param name="_value"></param>
        /// <returns></returns>
        public DataTable GetFishBoneByDepartmentAndYear(object[] _value)
        {
            string sp_Name = "SELECT_FishBoneDiagramByDepartmentAndYear";
            return dllDataStructure.getDataTable(sp_Name, _value);
        }


        /// <summary>
        /// 根据鱼骨图Id查询
        /// </summary>
        /// <param name="_value"></param>
        /// <returns></returns>
        public DataTable GetFishBoneById(object[] _value)
        {
            string sp_Name = "SELECT_FishBoneDiagramById";
            return dllDataStructure.getDataTable(sp_Name, _value);
        }

        /// <summary>
        /// 上传附件
        /// </summary>
        /// <param name="_value"></param>
        /// <returns></returns>
        public int UploadAttachmentPath(object[] _value)
        {
            string sp_Name = "Update_FishBoneDiagramAttachmentPathById";
            return dllDataStructure.getAffectRows(sp_Name, _value);
        }


        /// <summary>
        /// 删除鱼骨图
        /// </summary>
        /// <param name="_value"></param>
        /// <returns></returns>
        public int DelFishBoneById(object[] _value)
        {
            string sp_Name = "Del_FishBoneDiagramById";
            return dllDataStructure.getAffectRows(sp_Name, _value);
        }


        /// <summary>
        /// 提交年计划前言
        /// </summary>
        /// <param name="_value"></param>
        /// <returns></returns>
        public int SubmitFishBoneDiagram(object[] _value)
        {
            string sp_Name = "Update_FishBoneDiagramSubmitById";
            return dllDataStructure.getAffectRows(sp_Name, _value);
        }
       
    }
}
